<template>
	<view>
		<u-popup :show="popShow" round :mode="dir" @close="close" @open="open" closeable
			style="background-color: transparent;">
			<scroll-view scroll-y bindscrolltolower="lower"
				style="min-width: 50vw;height: 100%;border-radius: 2vw;background: #fff;overflow: hidden;padding: 2vw 3vw;box-sizing: border-box;">
				<!-- 	<text style="font-size: 28px;font-weight: bolder;display: flex;justify-content: center;">{{title}}</text> -->
				<view style="width: 100%;height:100%;"  >
					<slot name="test"></slot>
				</view>

			</scroll-view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		name: "spop",
		props: [
			'title', 'handleClose', 'handleOpen', 'dir'
		],

		data() {
			return {
				popShow: false
			};
		},
		methods: {
			lower(e) {
				console.log(e)
				uni.showToast({
					title: 22
				})
				this.$emit('rb')
			},
			close() {

				this.popShow = false;
				if (this.handleClose) {
					this.handleClose()
				}
				this.$emit('close')

			},
			open() {

				if (this.handleOpen) {
					this.handleOpen()
				}
				this.$emit('open')
				// alert(1)
				// this.popShow =true;
			},
			handleShow(isShow) {
				this.popShow = isShow;
			},
			// 公共方法，供父组件调用
			publicHandleShow(isShow) {
				this.handleShow(isShow);
			},

		}
	}
</script>

<style lang="scss">
	::v-deep .u-popup__content {
		background: transparent;
	}
</style>